import { defHttp } from '@/utils/http/axios';
import { LoginParams, GetUserInfoModel } from './model';

/**
 * @description: user login api
 */
export function loginApi(data: LoginParams) {
  return defHttp.post<string>({
    url: '/login',
    data,
  });
}

/**
 * @description: getUserInfo
 */
export function getUserInfo() {
  return defHttp.get<GetUserInfoModel>({ url: '/getInfo' });
}
